<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>发帖页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="<%=basePath%>JS/jquery-ui-1.11.2/external/jquery/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath%>JS/jquery-ui-1.11.2/jquery-ui.js"></script>
	<script type="text/javascript" src="<%=basePath%>JS/jquery-validation-1.13.1/dist/jquery.validate.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>JS/jquery-ui-1.11.2/jquery-ui.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>CSS/style.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>JS/jquery-validation-1.13.1/demo/css/screen.css">
  </head>
  
  <body>
  		<div id="head-search">
   	 		<span class="home-path"></span>
   	 		<span class="path-font">学习交流管理&nbsp;&nbsp;>>&nbsp;&nbsp;新鲜事管理&nbsp;&nbsp;>>&nbsp;&nbsp;我的帖子</span>
   		</div>
   		<div class="mainbody">
   			<div>
   				<form id="newsform" name="newform" method="post" action="<%=basePath %>relNewsAction">
   					<div class="divrow">主题：<input id="newsTheme" name="newsTheme"/></div>
   					<div class="divrow">内容：</div>
   					<div class="divrow">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea id="newsContent" name="newsContent" cols="100" rows="25" ></textarea></div>
   					<div class="divrow"><button id="saveActBtn" class="wong-button-text-ui wong-button-blue" onclick="javascrit:$('#newsform').submit();">
   					<span class="wong-ui-icon wong-icon-save"></span>
   					<span >发帖</span>
   				</button>
   		</div>	
   				</form>
   			</div>
   		</div>
   
  </body>
  <script>
  	$(function(){
  		$("#newsform").validate({
		 	rules:{
		 		newsTheme:"required",
		 		newsContent:{required:true,maxlength:5000},
		 					 		
		 	},
		 	messages:{
		 		newsTheme:"请输入帖子主题",
		 		newsContent:{required:"请输入帖子内容",	maxlength:"输入文本太长，请减少到5000个字符"}
		 		}	
		 });
  	});
  
  </script>
</html>
